package com.health.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 预约表
 * </p>
 *
 * @author konglz
 * @since 2023-04-16
 */
@Data
@TableName("appointment")
@ApiModel(value = "Appointment对象", description = "预约表")
public class Appointment implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("序号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("医生ID")
    private Integer doctorId;

    @ApiModelProperty("用户id")
    private Integer userId;

    @ApiModelProperty("病人id")
    private Integer patientId;

    @ApiModelProperty("病人姓名")
    private String patientName;

    @ApiModelProperty("套餐id")
    private Integer mealId;

    @ApiModelProperty("0 挂号 1 预约")
    private Integer type;

    @ApiModelProperty("工作时间0上午 1下午")
    private String workTime;

    @ApiModelProperty("可预约数")
    private Integer reservedNum;

    @ApiModelProperty("剩余预约数")
    private Integer availableNum;

    @ApiModelProperty("预约日期")
    private LocalDateTime appointDate;

    @ApiModelProperty("预约的费用")
    private BigDecimal cost;

    @ApiModelProperty("排班的状态0可约 1不可约")
    private Integer status;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("逻辑删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}
